<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Docker Compose 服务栈</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f8fafc;
            color: #334155;
            line-height: 1.6;
            min-height: 100vh;
        }

        .header {
            background: white;
            border-bottom: 1px solid #e2e8f0;
            padding: 2rem 0;
            margin-bottom: 3rem;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
        }

        h1 {
            font-size: 2rem;
            font-weight: 600;
            color: #1e293b;
            text-align: center;
            margin-bottom: 0.5rem;
        }

        .subtitle {
            text-align: center;
            color: #64748b;
            font-size: 1.1rem;
            font-weight: 400;
        }

        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .service-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 2rem;
            transition: all 0.2s ease;
        }

        .service-card:hover {
            border-color: #3b82f6;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
        }

        .service-header {
            display: flex;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .service-icon {
            width: 48px;
            height: 48px;
            background: #f1f5f9;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            margin-right: 1rem;
        }

        .service-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #1e293b;
        }

        .service-desc {
            color: #64748b;
            margin-bottom: 1.5rem;
            font-size: 0.95rem;
        }

        .service-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .service-status {
            display: flex;
            align-items: center;
            font-size: 0.875rem;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            background: #10b981;
            border-radius: 50%;
            margin-right: 0.5rem;
        }

        .service-port {
            font-size: 0.875rem;
            color: #64748b;
            background: #f1f5f9;
            padding: 0.25rem 0.75rem;
            border-radius: 6px;
            font-family: 'SF Mono', Monaco, monospace;
        }

        .service-link {
            display: inline-flex;
            align-items: center;
            background: #3b82f6;
            color: white;
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: background 0.2s ease;
            width: 100%;
            justify-content: center;
        }

        .service-link:hover {
            background: #2563eb;
        }

        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 2rem;
        }

        .info-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 1.5rem;
        }

        .info-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
        }

        .info-title::before {
            content: '';
            width: 4px;
            height: 20px;
            background: #3b82f6;
            border-radius: 2px;
            margin-right: 0.75rem;
        }

        .info-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 0;
            border-bottom: 1px solid #f1f5f9;
            font-size: 0.9rem;
        }

        .info-item:last-child {
            border-bottom: none;
        }

        .info-label {
            font-weight: 500;
            color: #475569;
        }

        .info-value {
            color: #64748b;
            font-family: 'SF Mono', Monaco, monospace;
            font-size: 0.85rem;
        }
    </style>
</head>
<body>
    <div class="header">
        <div class="container">
            <h1>Docker Compose 服务栈</h1>
            <p class="subtitle">现代化容器化应用管理平台</p>
        </div>
    </div>

    <div class="container">
        <div class="services-grid">
            <div class="service-card">
                <div class="service-header">
                    <div class="service-icon">🐰</div>
                    <div class="service-title">RabbitMQ</div>
                </div>
                <div class="service-desc">
                    高性能消息队列服务器，支持多种消息协议，提供可靠的异步消息传递和任务队列功能
                </div>
                <div class="service-meta">
                    <div class="service-status">
                        <div class="status-dot"></div>
                        运行中
                    </div>
                    <div class="service-port">:15672</div>
                </div>
                <a href="/rabbitmq/" class="service-link" target="_blank">访问管理界面</a>
            </div>

            <div class="service-card">
                <div class="service-header">
                    <div class="service-icon">📦</div>
                    <div class="service-title">Redis</div>
                </div>
                <div class="service-desc">
                    高性能内存数据库，支持多种数据结构，广泛用于缓存、会话存储和实时数据处理
                </div>
                <div class="service-meta">
                    <div class="service-status">
                        <div class="status-dot"></div>
                        运行中
                    </div>
                    <div class="service-port">:6379</div>
                </div>
                <a href="/redis-info" class="service-link">查看服务信息</a>
            </div>

            <div class="service-card">
                <div class="service-header">
                    <div class="service-icon">🍃</div>
                    <div class="service-title">MongoDB</div>
                </div>
                <div class="service-desc">
                    现代化NoSQL文档数据库，支持灵活的数据模型和强大的查询功能，适合快速开发
                </div>
                <div class="service-meta">
                    <div class="service-status">
                        <div class="status-dot"></div>
                        运行中
                    </div>
                    <div class="service-port">:27017</div>
                </div>
                <a href="/mongodb-info" class="service-link">查看服务信息</a>
            </div>

            <div class="service-card">
                <div class="service-header">
                    <div class="service-icon">🐘</div>
                    <div class="service-title">PostgreSQL</div>
                </div>
                <div class="service-desc">
                    企业级关系型数据库，集成pgvector扩展，支持向量存储和AI应用的相似性搜索
                </div>
                <div class="service-meta">
                    <div class="service-status">
                        <div class="status-dot"></div>
                        运行中
                    </div>
                    <div class="service-port">:5432</div>
                </div>
                <a href="/postgres-info" class="service-link">查看服务信息</a>
            </div>

            <div class="service-card">
                <div class="service-header">
                    <div class="service-icon">🌐</div>
                    <div class="service-title">Nginx</div>
                </div>
                <div class="service-desc">
                    高性能Web服务器和反向代理，提供负载均衡、静态文件服务和API网关功能
                </div>
                <div class="service-meta">
                    <div class="service-status">
                        <div class="status-dot"></div>
                        运行中
                    </div>
                    <div class="service-port">:8080</div>
                </div>
                <a href="/health" class="service-link">健康检查</a>
            </div>
        </div>

        <div class="info-grid">
            <div class="info-card">
                <div class="info-title">访问信息</div>
                <div class="info-item">
                    <span class="info-label">RabbitMQ 用户名</span>
                    <span class="info-value">admin</span>
                </div>
                <div class="info-item">
                    <span class="info-label">RabbitMQ 密码</span>
                    <span class="info-value">查看 .env 文件</span>
                </div>
                <div class="info-item">
                    <span class="info-label">Redis 密码</span>
                    <span class="info-value">查看 .env 文件</span>
                </div>
                <div class="info-item">
                    <span class="info-label">MongoDB 用户名</span>
                    <span class="info-value">admin / appuser</span>
                </div>
                <div class="info-item">
                    <span class="info-label">MongoDB 密码</span>
                    <span class="info-value">查看 .env 文件</span>
                </div>
                <div class="info-item">
                    <span class="info-label">PostgreSQL 用户名</span>
                    <span class="info-value">postgres / appuser</span>
                </div>
                <div class="info-item">
                    <span class="info-label">PostgreSQL 密码</span>
                    <span class="info-value">查看 .env 文件</span>
                </div>
                <div class="info-item">
                    <span class="info-label">Nginx 认证</span>
                    <span class="info-value">无需认证</span>
                </div>
            </div>

            <div class="info-card">
                <div class="info-title">端口映射</div>
                <div class="info-item">
                    <span class="info-label">Nginx HTTP</span>
                    <span class="info-value">8080</span>
                </div>
                <div class="info-item">
                    <span class="info-label">Nginx HTTPS</span>
                    <span class="info-value">8443</span>
                </div>
                <div class="info-item">
                    <span class="info-label">RabbitMQ AMQP</span>
                    <span class="info-value">5672</span>
                </div>
                <div class="info-item">
                    <span class="info-label">RabbitMQ Management</span>
                    <span class="info-value">15672</span>
                </div>
                <div class="info-item">
                    <span class="info-label">Redis</span>
                    <span class="info-value">6379</span>
                </div>
                <div class="info-item">
                    <span class="info-label">MongoDB</span>
                    <span class="info-value">27017</span>
                </div>
                <div class="info-item">
                    <span class="info-label">PostgreSQL</span>
                    <span class="info-value">5432</span>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
